package com.learn.excel.core.consts;

/**
 * @author anri
 * @date 2020/9/30 16:18
 */
public class SysConstants {
    //默认密码 用户名首字母+123456
    public static final String PWD = "123456";
    //一次历史数据查询最大结果数量
    public final static int SELECT_DATA_NUMBER_MAX = 100000;

    //此用户或角色未选择此菜单
    public static final Integer PERMISSION_SELECTED_NO = 0;
    //此用户或角色已选择此菜单
    public static final Integer PERMISSION_SELECTED_YES = 1;

    //未选择
    public static final Integer SELECTED_NO = 0;
    //已选择
    public static final Integer SELECTED_YES = 1;

    //查询并返回所有数据信息
    public static final boolean SELECTED_ALL_YES = true;
    //查询并返回所属数据信息
    public static final boolean SELECTED_ALL_NO = false;

    //用户状态正常
    public static final int USER_STATUS_NORMAL = 1;
    //用户状态失效
    public static final int USER_STATUS_ABNORMAL = 0;

    //项目状态：未知 0 , 正常 1，离线 2，告警 3
    public static final int DATA_STATUS_UNKNOW = 0;
    public static final int DATA_STATUS_NORMAL = 1;
    public static final int DATA_STATUS_OFFLINE = 2;
    public static final int DATA_STATUS_ALARM_LEVEL3 = 3;
    public static final int DATA_STATUS_ALARM_LEVEL2 = 4;
    public static final int DATA_STATUS_ALARM_LEVEL1 = 5;

    //项目状态：未知 0 , 正常 1，离线 2，告警 3
    public static final String DATA_STATUS_NAME_UNKNOW = "unknow";
    public static final String DATA_STATUS_NAME_NORMAL = "normal";
    public static final String DATA_STATUS_NAME_OFFLINE = "offline";
    public static final String DATA_STATUS_NAME_ALARM = "alarm";
    public static final String DATA_STATUS_NAME_TOTAL = "total";

    //监测数据超时时间设置(默认30分钟）
    public static final int DATA_TIME_OFFLINE = 30;


    //项目类型：测风塔&电塔
    public static final int PROJECT_TYPE_PYLON = 10;
    public static final int PROJECT_TYPE_CFT = 11;

    //是否显示
    public static final int DISPLAY_YES = 1;
    public static final int DISPLAY_NO = 0;

    //是否显示
    public static final int CONFIRMED = 1;
    public static final int UNCONFIRM = 0;

    //是否显示
    public static final int LEVEL1 = 1;
    public static final int LEVEL2 = 2;
    public static final int LEVEL3 = 3;

    //系统操作方法
    public static final String OPER_METHOD_ADD = "ADD";
    public static final String OPER_METHOD_UPDATE = "UPDATE";
    public static final String OPER_METHOD_DELETE = "DELETE";
    public static final String OPER_METHOD_LOGIN = "LOGIN";
    public static final String OPER_METHOD_LOGOUT = "LOGOUT";
    public static final String OPER_METHOD_AES_LOGIN = "AES_LOGIN";

    //project表 type类型 项目：1001；标段：1002；高支模：1003
    public static final Integer  TYPE_PROJECT= 1001;
    public static final Integer  TYPE_SECTION= 1002;
    public static final Integer  TYPE_FORMWORK= 1003;

    //1：封面图片，2：CAD图片，
    public static final Integer TYPE_IMG_COVER = 1;
    public static final Integer TYPE_IMG_CAD = 2;

    //1：项目资料，2：模板资料，3：人工巡检
    public static final Integer TYPE_FILE_PROJECT = 1;
    public static final Integer TYPE_FILE_INSPECTION = 2;
    public static final Integer TYPE_FILE_INFODAILYPAPER = 3;

    //1：模板验收序号，2：人工巡检序号
    public static final String CODE_INSPECTION = "YS";
    public static final String CODE_INFODAILYPAPER = "XJ";

    //告警下拉框
    public static String getLevelName(Integer level){
        String name = "";
        switch (level){
            case 1:
                name="一级告警";
                break;
            case 2:
                name="二级告警";
                break;
            case  3:
                name="三级告警";
                break;
        }
        return name;
    }
}
